<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            width:100%;
            height: 100%;
            margin: 0;
            padding: 0;
        }
        .function{
            width: 80%;
            height: 30%;
            position: absolute;
            left: 10%;
            top: 2%;
            border: 1px solid dimgray;

        }
        .table-border{
            width: 80%;
            height: 100%;
            position: absolute;
            left: 10%;
            top: 35%;
        }
    </style>
</head>
<body>
<div class="function">
    <h3 align="center">学生管理系统</h3>
    <form action="student" >
        <input type="text" name="name" placeholder="学生姓名">
        <input type="text" name="department" placeholder="学生科系">
        <input type="text" name="grade" placeholder="学生班级">
        <input type="text" name="student" placeholder="学生学号">
        <input type="submit" value="添加">
    </form>
    <br>
    <br>
    <form action="select">
        <input type="text" name="id"   readonly="readonly">
        <input type="text" name="name"  placeholder="学生姓名">
        <input type="text" name="department" placeholder="学生科系">
        <input type="text" name="grade" placeholder="学生班级">
        <input type="text" name="student" placeholder="学生学号">
        <input type="submit" value="查询">
    </form>
</div>

<div class="table-border">
<table border="1" align="center">
    <caption>学生列表</caption>
    <tr>
        <th width="50px">id</th>
        <th width="130px">名字</th>
        <th width="130px">科系</th>
        <th width="130px">班级</th>
        <th width="130px">学号</th>
        <th width="50px">操作</th>
    </tr>
    <tr th:each="s:${list}">
        <td th:text="${s.id}"></td>
        <td><a th:href="'showupdate?id='+${s.id}"
               th:text="${s.name}"></a></td>
        <td th:text="${s.department}"></td>
        <td th:text="${s.grade}"></td>
        <td th:text="${s.student}"></td>
        <!--?是请求地址和参数分隔符  ?后面写请求参数-->
        <td><a th:href="'delete?id='+${s.id}">删除</a></td>

    </tr>
</table>
</div>
</body>
</html>